var symbols = new Array();
//create
$(document).ready(function() {
	addDeleteButton();
});
function addDeleteButton(){
	$('#symbols').append('<input type="text" class="deletable">');
	//User clicks on delete button on text input
	$('input.deletable[disabled!=disabled]').wrap('<span class="deleteicon" />').after($('<span/>').click(
	function() {
		//Remove text box if disabled 
		if($(this).prev('input.deletable').attr('disabled') == 'disabled'){
			$(this).prev('input.deletable').remove();
			//Remove 'x' button
			$(this).remove();
			//TODO: Remove text from symbol list
		}
	}));
	//user hits enter while in text box
	$('input.deletable[disabled!=disabled]').bind('keypress', enterPressedHandler).focus();
	$('input.deletable[disabled=disabled]').unbind('keypress', enterPressedHandler);
}
enterPressedHandler = function(e){
		var code = (e.keyCode ? e.keyCode : e.which);
		if(code == 13) { 
			//Add verify symbol is valid
			//Make input uneditable
			$(this).attr('disabled', 'disabled');
			$(this).css({'background-color' : '#dcdcdc'});
			//Add text to list of symbols
			//create new text box
			addDeleteButton();
			//$('.symbols').append('<input type="text" class="deletable">');
		}
	}